package com.example.yan.java文件写入;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Main {


    public static void main(String[] args)  {
        try {
            BufferedWriter out = new BufferedWriter(new FileWriter("nowcoder.txt"));
            out.write("牛客教程");
            out.close();
            System.out.println("文件创建成功！");
        } catch (IOException e) {
        }
    }


}
